# Social mobilisation in partisan spaces
# Replication Materials

# List and install required packages
# last change: 2020-04-09

# This is a list of all R packages used in the replication code
required_packages <- c(
  "tidyverse",  # includes "dplyr" and "ggplot2"
  "interflex",
  "car",
  "dplyr",
  "lmtest",
  "readstata13",
  "randomizr",
  "ri",
  "estimatr",
  "texreg",
  "descr"
)

# The following code will automatically install required packages which are
# not available on this system.

for (package in required_packages) {
  available <- suppressWarnings(require(package, quietly = TRUE))
  if (!available) {
    install.packages(package, dependencies = TRUE)
  }
}
